﻿//-----------------------------------------------------------------------------
// <copyright file="IFrameworkObject.cs" company="William E. Kempf">
//     Copyright (c) William E. Kempf.
// </copyright>
//-----------------------------------------------------------------------------

namespace Onyx.Windows
{
    using System;
    using System.ComponentModel;
    using System.Windows;
    using System.Windows.Controls;
    using System.Windows.Data;
    using System.Windows.Input;
    using System.Windows.Markup;
    using System.Windows.Media.Animation;

    public interface IFrameworkObject
#if WPF
 : IFrameworkInputElement, ISupportInitialize
#endif
    {
#if WPF
        void BeginStoryboard(Storyboard storyboard);
        void BeginStoryboard(Storyboard storyboard, HandoffBehavior handoffBehavior);
        void BeginStoryboard(Storyboard storyboard, HandoffBehavior handoffBehavior, bool isControllable);
        void BringIntoView();
        object FindResource(object resourceKey);
        BindingExpression GetBindingExpression(DependencyProperty dp);
        bool MoveFocus(TraversalRequest request);
        DependencyObject PredictFocus(FocusNavigationDirection direction);
        void RegisterName(string name, object scopedElement);
        BindingExpression SetBinding(DependencyProperty dp, string path);
        BindingExpressionBase SetBinding(DependencyProperty dp, BindingBase binding);
        void SetResourceReference(DependencyProperty dp, object name);
        bool ShouldSerializeResources();
        bool ShouldSerializeStyle();
        object TryFindResource(object resourceKey);
        void UnregisterName(string name);
        ContextMenu ContextMenu { get; set; }
        Style FocusVisualStyle { get; set; }
        bool ForceCursor { get; set; }
        InputScope InputScope { get; set; }
        bool IsInitialized { get; }
        bool IsLoaded { get; }
        bool OverridesDefaultStyle { get; set; }
        DependencyObject TemplatedParent { get; }
        object ToolTip { get; set; }
        event ContextMenuEventHandler ContextMenuClosing;
        event ContextMenuEventHandler ContextMenuOpening;
        event DependencyPropertyChangedEventHandler DataContextChanged;
        event EventHandler Initialized;
        event EventHandler<DataTransferEventArgs> SourceUpdated;
        event EventHandler<DataTransferEventArgs> TargetUpdated;
        event ToolTipEventHandler ToolTipClosing;
        event ToolTipEventHandler ToolTipOpening;
        event RoutedEventHandler Unloaded;
        ResourceDictionary Resources { get; set; }
#endif
#if SILVERLIGHT
        BindingExpressionBase SetBinding(DependencyProperty dp, Binding binding);
        bool CaptureMouse();
        void ReleaseMouseCapture();
        string Name { get; set; }
        event KeyEventHandler KeyDown;
        event KeyEventHandler KeyUp;
        event MouseEventHandler MouseEnter;
        event MouseEventHandler MouseLeave;
        event MouseButtonEventHandler MouseLeftButtonDown;
        event MouseButtonEventHandler MouseLeftButtonUp;
        event MouseEventHandler MouseMove;
        ResourceDictionary Resources { get; }
#endif
        object FindName(string name);
        Cursor Cursor { get; set; }
        object DataContext { get; set; }
        XmlLanguage Language { get; set; }
        DependencyObject Parent { get; }
        Style Style { get; set; }
        object Tag { get; set; }
        event RoutedEventHandler Loaded;
    }
}
